<@sys.appClientList channel=channel advanced=true
            userId=userId startLastLoginDate=startLastLoginDate endLastLoginDate=endLastLoginDate
            startCreateDate=startCreateDate endCreateDate=endCreateDate disabled=disabled
            orderField=orderField orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'channel'/>:</label>
                    <input type="text" name="channel" value="${channel!}"/>
                </li>
                <li>
                    <label><@t.page 'user.id'/>:</label>
                    <input type="text" name="userId" value="${userId!}"/>
                </li>
                <li>
                    <label><@t.page 'user.last_login_date'/>:</label>
                    <input type="text" name="startLastLoginDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startLastLoginDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                    <span>-</span>
                    <input type="text" name="endLastLoginDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endLastLoginDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </li>
                <li>
                    <label><@t.page 'create_date'/>:</label>
                    <input type="text" name="startCreateDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startCreateDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                    <span>-</span>
                    <input type="text" name="endCreateDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endCreateDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </li>
                <#include "../include_page/disabled.html"/>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="card">
    <table class="table" width="100%" layoutH orderField="${orderField!}" orderType="${orderType!}">
        <thead>
            <tr>
                <th><@t.page 'id'/></th>
                <th><@t.page 'channel'/></th>
                <th><@t.page 'uuid'/></th>
                <th><@t.page 'user.id'/></th>
                <th><@t.page 'user.nickname'/></th>
                <th><@t.page 'version'/></th>
                <th orderField="lastLoginDate"><@t.page 'user.last_login_date'/></th>
                <th><@t.page 'user.last_login_ip'/></th>
                <th orderField="createDate"><@t.page 'create_date'/></th>
                <th><@t.page 'disabled'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.userId!/>
            </#list>
            <@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
            <#list page.list as a>
            <tr>
                <td>${a.id!}</td>
                <td>${a.channel!}</td>
                <td>${a.uuid!}</td>
                <td>${a.userId!}</td>
                <td>${(userMap[a.userId?string].nickname)!}</td>
                <td>${a.clientVersion!}</td>
                <td>${a.lastLoginDate!}</td>
                <td>${a.lastLoginIp!}</td>
                <td>${a.createDate!}</td>
                <td>${(a.disabled)?then('<font color="red">'+t.pageMessage('disabled')+'</font>',t.pageMessage('normal'))?no_esc}</td>
                <td class="wrap">
                    <#if a.disabled>
                        <a href="sysAppClient/enable?id=${a.id}&_csrf=<@tools.csrfToken admin=true/>" class="btnText blue" title="<@t.page 'confirm.enable'/>" target="ajaxTodo"><i class="icon-circle"></i><@t.page 'button.enable'/></a>
                    <#else>
                        <a href="sysAppClient/disable?id=${a.id}&_csrf=<@tools.csrfToken admin=true/>" class="btnText red" title="<@t.page 'confirm.disable'/>" target="ajaxTodo"><i class="icon-ban-circle"></i><@t.page 'button.disable'/></a>
                    </#if>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@sys.appClientList>